A geo-fencing built in a portable electronic device is a preset virtual perimeter around a geographical location. When the portable electronic device enters or leaves the virtual perimeter, the geo-fencing triggers a preset event such as, outputting a notification. In other approaches, the geo-fencing built in the portable electronic device is preset by a user, and the portable electronic device cannot automatically set the geo-fencing.